#include <stdio.h>
#include "sqlist.h"

void PrintList(struct SqList L) {
    printf("you are displaying SqList >>>\n");
    printf("length : %d\n", L.length);
    printf("data : ");
    for (int i = 0; i < L.length; ++i) {
        printf("%d ", L.data[i]);
    }
    printf("\n");
}

int main() {
    struct SqList sqList;
    InitList(&sqList);
    InsertElem(&sqList, 0, 3);
    InsertElem(&sqList, 0, 5);
    InsertElem(&sqList, 1, 7);
    InsertElem(&sqList, 3, 11);
    ElemType e;
    DeleteElem(&sqList, 2, &e);
    InsertElem(&sqList, 2, 9);
    PrintList(sqList);
    printf("deleted elem is %d\n", e);
    for (int i = 0; i < 100; ++i) {
        InsertElem(&sqList, sqList.length, i);
    }
    return 0;
}
